package Week2.J0426;

import java.util.Scanner;

public class 倒置字符串 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String[] arr = s.split(" ");
        StringBuffer sbr = new StringBuffer();
        for (int i = arr.length-1; i >= 0; i--) {
            sbr.append(arr[i]).append(" ");
        }
            System.out.print(sbr);
    }
}
